package com.robotic.kafka;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class KafkaTestRunner implements CommandLineRunner {

    private final KafkaProducerService producerService;

    @Autowired
    public KafkaTestRunner(KafkaProducerService producerService) {
        this.producerService = producerService;
    }

    @Override
    public void run(String... args) throws Exception {
        //System.out.println("Spring Boot应用已启动，正在发送一条测试消息...");
        //producerService.sendMessage("你好, Kafka! 这是来自Spring Boot的问候。");
    }
}
